import { ApiProperty, ApiPropertyOptional } from '@nestjs/swagger';
import {
  IsBIC,
  IsBoolean,
  IsNumber,
  IsOptional,
  IsString,
} from 'class-validator';

export class WorkerEntity {
  @ApiProperty()
  @IsString()
  code: string;
  @ApiProperty()
  @IsString()
  name: string;
  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  description?: string;
  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  mobile?: string;
  @ApiPropertyOptional()
  @IsNumber()
  @IsOptional()
  age?: number;
  @ApiPropertyOptional()
  @IsString()
  @IsOptional()
  sex?: string;
  @ApiPropertyOptional()
  @IsBoolean()
  @IsOptional()
  disabled: boolean;
}
